package com.zjhcsoft.komm;

import com.zjhcsoft.komm.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.List;
import java.util.Arrays;

@Name("roleList")
public class RoleList extends EntityQuery {

	private static final String[] RESTRICTIONS = {"lower(role.name) like concat(lower(#{roleList.role.name}),'%')",};

	private Role role = new Role();

	@Override
	public String getEjbql() {
		return "select role from Role role";
	}

	@Override
	public Integer getMaxResults() {
		return 25;
	}

	public Role getRole() {
		return role;
	}

	@Override
	public List<String> getRestrictions() {
		return Arrays.asList(RESTRICTIONS);
	}

}
